// v-permission 按钮权限
import { getUserPermission } from '@/utils/cache';

export default {
  inserted: (el, binding, vnode) => {
    const userRight = getUserPermission() || [];
    if (binding.value && !userRight.includes(binding.value)) {
      el.parentNode.removeChild(el);
    }
  }
};
